import { createApp } from "vue";
import App from "./App.vue";
import ElementPlus from "element-plus"; //elementul
import "element-plus/dist/index.css"; //    plus
import * as ElementPlusIconsVue from "@element-plus/icons-vue"; //element图标
import router from "./router"; //路由
import { createPinia } from "pinia"; //状态机
import piniaPluginPersist from "pinia-plugin-persist"; //持久化
import route from "./utils/yzy/route";
// import ElementPlus from 'element-plus'
import zhCn from "element-plus/dist/locale/zh-cn.mjs";
const pinia = createPinia();
pinia.use(piniaPluginPersist);
const app = createApp(App);
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component);
}
// app.use(ElementPlus);
app.use(ElementPlus, {
  locale: zhCn,
});
app.use(pinia);
route();
app.use(router);
app.mount("#app");
